<template>
    <div>
        <div class="bottom">
            <div class="content">
                <van-icon name="cross" class="icon" @click="close" />
                <ul class="container">
                    <li @click="tan">
                        <van-icon name="phone-o" size="30px" />
                        <p style="font-size: 14px;">录制语音</p>
                    </li>
                    <li @click="tans">
                        <van-icon name="video-o" size="30px" />
                        <p style="font-size: 14px;">录制视频</p>
                    </li>
                </ul>
            </div>

        </div>
    </div>

</template>

<script setup>

import { ref, provide,inject } from 'vue';
// 发送close事件
const close = () => {
    provide('close', true)
}
const tan = () => {
    prop.value = true
}
const tans = () => {
    prop.value = true
}
const prop=inject('shows')
</script>
<style scoped>
.bottom {
    width: 100vw;
    height: 100vh;
    background-color: rgb(0, 0, 0, 0.5);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1;
}

.content {
    width: 300px;
    height: 180px;
    background-color: rgb(255, 255, 255);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

.content .icon {
    top: 10px;
    left: 90%;
    position: relative;
    z-index: 2;
}

.container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
}

.container li {
    width: 80px;
    height: 100px;
    border: 1px solid #000;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #000;
}
</style>